package tree;

public class NearestFather {
    public static void main(String[] args) {
        Tree.Node root = new Tree.Node((int)(Math.random()*10)+1);
        root.left = new Tree.Node((int)(Math.random()*10)+1);
        root.right = new Tree.Node((int)(Math.random()*10)+1);
        root.left.left = new Tree.Node((int)(Math.random()*10)+1);
        root.left.right = new Tree.Node((int)(Math.random()*10)+1);
        root.right.left = new Tree.Node((int)(Math.random()*10)+1);
        root.right.right = new Tree.Node((int)(Math.random()*10)+1);

        Node n = nearestFather(root,root.left.left,root.right.left);
    }

    private static Node nearestFather(Tree.Node root, Tree.Node left, Tree.Node left1) {
        Node n = null;
        return n;
    }

    static class Node {
        int value;
        Tree.Node left;
        Tree.Node right;
        Node(int value) {
            this.value = value;
        }
    }
}
